@extends('simple-pc.views.layout')
@section('content')
    <link rel="stylesheet" href="/static/libs/swiper-2.7.6/idangerous.swiper.css">
    <script src="/static/libs/swiper-2.7.6/idangerous.swiper.min.js"></script>
    <link rel="stylesheet" href="/themes/simple-pc/static/css/index.css">
    <div id="b001" class="swiper-container">
        <div class="swiper-wrapper">
            @foreach ($vars['slide']['top_slide'] as $item)
                <div class="swiper-slide">
                    <div class="swiper-slide-img" style="background-image: url('{{ $item->thumb }}')"></div>
                </div>
            @endforeach
        </div>
    </div>
    <div id="b002" class="block-con">
        <div class="block-title">{{$vars['service']['title']}}</div>
        @if ($vars['service']['subTitle'])
            <div class="block-sub-title">{{$vars['service']['subTitle']}}</div>
        @endif
        <div class="service-con block-main clearfix">
            @for ($i = 1; $i < 5; $i++)
                <div class="service-item">
                    <div class="service-item-img img-con">
                        <img src="{{$vars['service']['itemImg'.$i]}}">
                    </div>
                    <div class="service-item-title">
                        {{$vars['service']['itemTitle'.$i]}}
                    </div>
                    <div class="service-item-desc">
                        {{$vars['service']['itemDesc'.$i]}}
                    </div>
                </div>
            @endfor
        </div>

    </div>
    <div id="b003" class="block-con">
        <div class="block-title">{{$vars['case']['title']}}</div>
        @if ($vars['case']['subTitle'])
            <div class="block-sub-title">{{$vars['case']['subTitle']}}</div>
        @endif
        <div class="case-con block-main">
            <img src="{{$vars['case']['img']}}">
        </div>
    </div>
    <div id="b004" class="advantage-block block-con">
        <div class="block-title">{{$vars['advantage']['title']}}</div>
        @if ($vars['advantage']['subTitle'])
            <div class="block-sub-title">{{$vars['advantage']['subTitle']}}</div>
        @endif
        <div class="advantage-con block-main clearfix">
            @for ($i = 1; $i < 7; $i++)
                <div class="advantage-item">
                    <div class="advantage-item-top">
                    <span class="advantage-item-icon">
                        <img src="{{$vars['advantage']['itemImg'.$i]}}">
                    </span>
                    <span class="advantage-item-title">
                        {{$vars['advantage']['itemTitle'.$i]}}
                    </span>
                    </div>
                    <div class="advantage-item-desc">
                        {{$vars['advantage']['itemDesc'.$i]}}
                    </div>
                </div>
            @endfor
        </div>
    </div>
    <div id="b005" class="block-con">
        <div class="block-title">{{$vars['about']['title']}}</div>
        @if ($vars['about']['subTitle'])
            <div class="block-sub-title">{{$vars['about']['subTitle']}}</div>
        @endif
        <div class="about-con block-main">
            <div class="about-left">
                <div class="about-desc">
                    {!! $vars['about']['desc'] !!}
                </div>
                <div class="about-right">
                    <img src="{{$vars['about']['img']}}">
                </div>
            </div>
        </div>
    </div>
    <div class="news-block block-con">
        <div class="block-title">最新资讯</div>
        <div class="news-con block-main clearfix">
            @foreach ((new \app\common\services\content\ArticleService())->getLastList(6,0,0,0) as $item)
                <div class="news-item">
                    <div class="news-item-top clearfix">
                        <div class="news-item-title">
                            {{$item['title']}}
                        </div>
                        <div class="news-item-time">
                            {{date('Y-m-d',$item['publish_time'])}}
                        </div>
                    </div>
                    <div class="news-item-desc">
                        {{$item['description']}}
                    </div>
                </div>
            @endforeach
        </div>
    </div>
    <script>
        $(function(){
            var mySwiper = $('.swiper-container').swiper({
                loop:true,
                autoplay:3000
                //其他设置
            });
        })
    </script>
@endsection